fid=fopen('mymagic.dat','w');
count=fwrite(fid,magic(5),'int16')
%fprintf(fid,'%d',magic(5));
fclose(fid);
fid=fopen('mymagic.dat','r');
A=fread(fid,[5,5],'int16');
fclose(fid);
A
